home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / utilit~1 / groffvar.zoo / source / gendef.sh < prev    next >
Encoding:
Text File  |  1993-03-05  |  273 b   |  26 lines

  1. # gendef filename var=val var=val
  2.  
  3. file=$1
  4. shift
  5.  
  6. #defs="#define $1"
  7. #shift
  8. defs=""
  9. for def
  10. do
  11.     defs="$defs
  12. #define $def"
  13. done
  14.  
  15. t=/tmp/groff.$$
  16.  
  17. sed -e 's/=/ /' >$t <<EOF
  18. $defs
  19. EOF
  20.  
  21. test -r $file && cmp -s $t $file || cp $t $file
  22.  
  23. rm -f $t
  24.  
  25. exit 0
  26.